#pragma once

#include "Foundation.h"

/*
==================
Class Room

Declares encapsulated data relevant to a single room containing
beds
==================
*/
class Hotel;
class Reservation;

class Room : public Num_element {
protected:
	friend class Hotel;
	
public:
	enum RoomType {
		SINGLE	= 0,
		DOUBLE	= 1,
		SUITE 	= 2,
	};
					Room(ifstream &file, int roomNumber);	// Constructor
					Room(int roomNumber);					// Constructor
	virtual			~Room();								// Destructor
	virtual void 	WriteToFile(ofstream &file);			// Write to file
	virtual void	display();								// Displays
	virtual int 	getBedCount();							// Return bedCount
	RoomType 		GetType();								// Return roomType
	int 			getRoomNumber();					   // Return roomNumber
	bool 			AvailableAtDate(Date d);
	bool 			AvailableInPeriod(Date from, Date to);

protected:
	List			*reservations;
	int				*roomNumber;		// Points to Num_element's "number"
	int				bedCount;
	bool			breakfastIncluded;
	RoomType 		roomType;
	Reservation*	getCurrentReservation();
	void			addReservation(Reservation *toAdd);
	void			removeReservation(Reservation *toRemove);
};


